package com.fw.system.admin.service.impl;

import java.util.List;
import com.fw.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.fw.common.IdXD;
import com.fw.system.admin.mapper.TbWechatFootMapper;
import com.fw.system.admin.domain.TbWechatFoot;
import com.fw.system.admin.service.ITbWechatFootService;
import com.fw.utils.DateUtils;
/**
 * 微信步数Service业务层处理
 * 
 * @author yanwei
 * @date 2023-04-04
 */
@Service
public class TbWechatFootServiceImpl extends ServiceImpl<TbWechatFootMapper, TbWechatFoot> implements ITbWechatFootService
{
    @Autowired
    private TbWechatFootMapper tbWechatFootMapper;

    @Autowired
    private IdXD idXD;

    /**
     * 查询微信步数
     * 
     * @param id 微信步数ID
     * @return 微信步数
     */
    @Override
    public TbWechatFoot selectTbWechatFootById(String id)
    {
        return tbWechatFootMapper.selectTbWechatFootById(id);
    }

    /**
     * 查询微信步数列表
     * 
     * @param tbWechatFoot 微信步数
     * @return 微信步数
     */
    @Override
    public List<TbWechatFoot> selectTbWechatFootList(TbWechatFoot tbWechatFoot)
    {
        return tbWechatFootMapper.selectTbWechatFootList(tbWechatFoot);
    }

    /**
     * 新增微信步数
     * 
     * @param tbWechatFoot 微信步数
     * @return 结果
     */
    @Override
    public int insertTbWechatFoot(TbWechatFoot tbWechatFoot)
    {
        tbWechatFoot.setCreateTime(DateUtils.getNowDate());
        tbWechatFoot.setId(idXD.nextId());
        return tbWechatFootMapper.insertTbWechatFoot(tbWechatFoot);
    }

    /**
     * 修改微信步数
     * 
     * @param tbWechatFoot 微信步数
     * @return 结果
     */
    @Override
    public int updateTbWechatFoot(TbWechatFoot tbWechatFoot)
    {
        tbWechatFoot.setUpdateTime(DateUtils.getNowDate());
        return tbWechatFootMapper.updateTbWechatFoot(tbWechatFoot);
    }

    /**
     * 批量删除微信步数
     * 
     * @param ids 需要删除的微信步数ID
     * @return 结果
     */
    @Override
    public int deleteTbWechatFootByIds(String[] ids)
    {
        return tbWechatFootMapper.deleteTbWechatFootByIds(ids);
    }

    /**
     * 删除微信步数信息
     * 
     * @param id 微信步数ID
     * @return 结果
     */
    @Override
    public int deleteTbWechatFootById(String id)
    {
        return tbWechatFootMapper.deleteTbWechatFootById(id);
    }
}
